package com.example.neusoft.zyfypt_wk.activity;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.VideoView;

import com.example.neusoft.zyfypt_wk.R;

public class ViewVideoContentActivity extends AppCompatActivity {
    private TextView tvname;
    private Button btnplay;
    private String fullpath;
    private String BASEURL
            ="http://amicool.neusoft.edu.cn/";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_view_video_content);
        init();
        String path=getIntent().getStringExtra("videopath");
        fullpath=BASEURL+"Uploads/video/video/"+path;
        tvname.setText(getIntent().getStringExtra("name"));


    }

    private void init() {
        tvname=(TextView) findViewById(R.id.textView12);
        btnplay=(Button)findViewById(R.id.button4);
        btnplay.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent=new Intent(ViewVideoContentActivity.this,ViewVideoActivity.class);
                intent.putExtra("path",fullpath);
                startActivity(intent);
            }
        });


    }
}
